#include "GroupEntry.hpp"
#include "EventResource.hpp"

#include <iostream>

Event::GroupEntry::GroupEntry() : Glib::ObjectBase("GroupEntry")
{
    std::cout << "Register Event::GroupEntry in GType System.\n";
}

Event::GroupEntry::GroupEntry(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder)
    : Glib::ObjectBase("GroupEntry"), Gtk::Box(cobject), m_refBuilder(refBuilder)
{  
}

Event::GroupEntry *
Event::GroupEntry::create()
{
    auto refBuilder = get_resource_from("/org/korack/event/ui/GroupEntry.xml");
    auto group_entry = Gtk::Builder::get_widget_derived<Event::GroupEntry>(refBuilder, "group_entry");
    if (!group_entry)
    {
        throw std::runtime_error("No object id=group_entry in ui file.");
    }
    return group_entry;
}
